package com.yb.core.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Copyright (C), 2022-2022, 姚兵
 * Author: 32210
 * Date: 2022/11/12 22:16
 * FileName: HttpConstant
 * Description:
 */
public class HttpConstant {

    public static final String SUCCESS="success";

    public static final String ERROR="error";
    public static final String AUTH_HEADER="Access-Token";

    public static final String MOBILE_PATTERN_ERROR="手机号格式错误";

    public static final String MOBILE_ERROR="手机号不能为空";
    @Getter
    @AllArgsConstructor
    public enum Response{
        SUCCESS(200,"请求成功"),
        ERROR(500,"系统内部错误"),
        USER_EMPTY(401,"用户名不能为空"),
        PASS_EMPTY(402,"密码不能为空"),
        TOKEN_ERROR(403,"非法token"),
        NO_PERMISSION(405,"权限不足"),
        NOT_LOGIN(406,"未登录"),
        USER_NOT_EXISTS(407,"用户不存在" ),
        INVALID_USER(408,"用户名密码错误"),
        MOBILE_ERROR(409,HttpConstant.MOBILE_ERROR),


        LOGIN_TYPE_ERROR(410,"登录方式错误"),
        VERIFY_CODE_EMPTY(411,"验证码不能为空") ,
        VERIFY_CODE_ERROR (412,"验证码错误"),
        MOBILE_RATE_ERROR(413,"验证码发送频繁"),
        REQUEST_FREQUENTLY(414, "请求频繁"),

        MOBILE_PATTERN_ERROR(415,HttpConstant.MOBILE_PATTERN_ERROR),
        VERIFY_CODE_EXPIRED(416 ,"验证码已失效" );

        private final Integer code;

        public final String msg;

    }
}
